﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Bot;
using System.Threading;
using Intorise.Common;

namespace 练级
{
    public partial class Form1 : MainWindow
    {
        public Form1()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 升级脚本
        /// </summary>
        protected override void RunScript()
        {
            while (!quit)
            {
                CaptureCurrentImage();
                if (CheckDisconnect())
                {
                    ConsoleBLL.WriteLineWaring("已断线，重新开始...");
                    BeginLogin(); break;
                }
                GetLevelFromOCR();
                ConsoleBLL.WriteLine("当前等级：" + CurrentLevel);
                if (CurrentLevel >= 20)
                {
                    playCompleted = true;
                    break;
                }

                Process接受任务();
                Process立即使用();
                Process完成任务();
                if (!isClosed每日充值)
                {
                    Process每日充值();
                }
                Thread.Sleep(1000 * 1);
            }
        }
    }
}
